package org.springside.examples.miniweb.entity.report;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.springframework.format.annotation.DateTimeFormat;
import org.springside.examples.miniweb.entity.account.User;

/**
 * 压缩机报表.
 * 
 * 注释见{@link User}.
 * 
 * @author calvin
 */
@Entity
@Table(name = "compressorreport")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class CompressorReport extends AssignedReport {

	/**
	 */
	private static final long serialVersionUID = 2708048402688150414L;

	private String maintanceNumber;

	private String customerOrderNumber;

	private String keycomment;

	private String SN;

	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date inputRepository;

	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date validation;

	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date tryRunning;

	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date leak;

	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date test;

	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date maintance;

	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date mtest;

	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date finishPackage;

	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date packages;

	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date outputRepository;

	private String comments;

	private String updatebypersion;

	public CompressorReport() {
	}

	public CompressorReport(Long id, String name) {
		this.id = id;
	}

	public String getComments() {
		return comments;
	}

	
	/**
	 * @return the customerOrderNumber
	 */
	public String getCustomerOrderNumber() {
		return customerOrderNumber;
	}

	/**
	 * @return the finishpackage
	 */
	public Date getFinishPackage() {
		return finishPackage;
	}

	/**
	 * @return the inputrepository
	 */
	public Date getInputRepository() {
		return inputRepository;
	}

	/**
	 * @return the keycomment
	 */
	public String getKeyComment() {
		return keycomment;
	}

	/**
	 * @return the leak
	 */
	public Date getLeak() {
		return leak;
	}

	/**
	 * @return the maintance
	 */
	public Date getMaintance() {
		return maintance;
	}

	/**
	 * @return the maintanceNumber
	 */
	public String getMaintanceNumber() {
		return maintanceNumber;
	}

	/**
	 * @return the mtest
	 */
	public Date getMtest() {
		return mtest;
	}

	/**
	 * @return the outputrepository
	 */
	public Date getOutputRepository() {
		return outputRepository;
	}

	/**
	 * @return the packages
	 */
	public Date getPackages() {
		return packages;
	}

	/**
	 * @return the reportid
	 */
	@Transient
	public String getReportId() {
		return "COM"+id;
	}
	
	public String getSN() {
		return SN;
	}

	/**
	 * @return the test
	 */
	public Date getTest() {
		return test;
	}

	/**
	 * @return the tryrunning
	 */
	public Date getTryRunning() {
		return tryRunning;
	}


	public String getUpdateByPersion() {
		return updatebypersion;
	}

	/**
	 * @return the validation
	 */
	public Date getValidation() {
		return validation;
	}


	/**
	 * @param comments
	 *            the comments to set
	 */
	public void setComments(String comments) {
		this.comments = comments;
	}


	/**
	 * @param customerOrderNumber
	 *            the customerOrderNumber to set
	 */
	public void setCustomerOrderNumber(String customerOrderNumber) {
		this.customerOrderNumber = customerOrderNumber;
	}

	/**
	 * @param finishpackage
	 *            the finishpackage to set
	 */
	public void setFinishPackage(Date finishPackage) {
		this.finishPackage = finishPackage;
	}

	/**
	 * @param inputrepository
	 *            the inputrepository to set
	 */
	public void setInputRepository(Date inputrepository) {
		this.inputRepository = inputrepository;
	}

	/**
	 * @param keycomment
	 *            the keycomment to set
	 */
	public void setKeyComment(String keycomment) {
		this.keycomment = keycomment;
	}

	/**
	 * @param leak
	 *            the leak to set
	 */
	public void setLeak(Date leak) {
		this.leak = leak;
	}

	/**
	 * @param maintance
	 *            the maintance to set
	 */
	public void setMaintance(Date maintance) {
		this.maintance = maintance;
	}

	/**
	 * @param maintanceNumber
	 *            the maintanceNumber to set
	 */
	public void setMaintanceNumber(String maintanceNumber) {
		this.maintanceNumber = maintanceNumber;
	}

	/**
	 * @param mtest
	 *            the mtest to set
	 */
	public void setMtest(Date mtest) {
		this.mtest = mtest;
	}

	/**
	 * @param outputrepository
	 *            the outputrepository to set
	 */
	public void setOutputRepository(Date outputrepository) {
		this.outputRepository = outputrepository;
	}

	/**
	 * @param packages
	 *            the packages to set
	 */
	public void setPackages(Date packages) {
		this.packages = packages;
	}


	/**
	 * /**
	 * 
	 * @param sN
	 *            the sN to set
	 */
	public void setSN(String sN) {
		SN = sN;
	}

	/**
	 * @param test
	 *            the test to set
	 */
	public void setTest(Date test) {
		this.test = test;
	}

	/**
	 * @param tryrunning
	 *            the tryrunning to set
	 */
	public void setTryRunning(Date tryrunning) {
		this.tryRunning = tryrunning;
	}


	/**
	 * @param updateByPersion
	 *            the updateByPersion to set
	 */
	public void setUpdateByPersion(String updateByPersion) {
		this.updatebypersion = updateByPersion;
	}

	/**
	 * @param validation
	 *            the validation to set
	 */
	public void setValidation(Date validation) {
		this.validation = validation;
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}

}
